<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c_rt" %>
<%@ attribute name="src" rtexprvalue="true" required="true" type="java.lang.String" %>
<%@ attribute name="title" rtexprvalue="true" required="false" type="java.lang.String" %>
<%@ attribute name="onclick" rtexprvalue="true" required="true" type="java.lang.String" %>
<%@ attribute name="border" rtexprvalue="true" required="false" type="java.lang.Boolean" %>
<%@ attribute name="border_color" rtexprvalue="true" required="false" type="java.lang.String" %>
<%@ attribute name="width" rtexprvalue="true" required="false" type="java.lang.String" %>
<%@ attribute name="height" rtexprvalue="true" required="false" type="java.lang.String" %>

<c_rt:if test="${empty width}">
	<c_rt:set var="width" value="150px;" />
</c_rt:if>
<c_rt:if test="${empty height}">
	<c_rt:set var="height" value="90px;" />
</c_rt:if>

<c_rt:choose>
	<c_rt:when test="${(not empty border) and border }">
		<c_rt:choose>
			<c_rt:when test="${(not empty border_color)}">
				<c_rt:set value="${pageScope['border_color']}" var="borderColor"/>
			</c_rt:when>
			<c_rt:otherwise>
				<c_rt:set value="#fff" var="borderColor"/>
			</c_rt:otherwise>
		</c_rt:choose>
		<img src="${src}" style="cursor:pointer;border:${borderColor} solid 4px;" title="${title}" alt="${title}" onclick="${onclick}" width="${width}" height="${height}">
	</c_rt:when>
	<c_rt:otherwise>
		<img src="${src}" style="cursor:pointer;" title="${title}" alt="${title}" onclick="${onclick}" width="${width}" height="${height}">
	</c_rt:otherwise>
</c_rt:choose>